<template>
	<!-- 房间操作 -->
	<view class="room-box">
		
		
		<!-- <view class="room-control" hover-class="room-control2" >
			<view class="roomtit">查看信息</view>
		</view> -->
		
		<block v-if="Ispermission">
			<view class="room-control"  hover-class="room-control2"
			@click = "handleUserMic('muted')">
				<view class="roomtit">麦克风</view>
				<view class="roomdesc" >
					<u-switch activeColor="#05c160" :value="!userInfo.muted"  ></u-switch>
				</view>
			</view>
			<view class="room-control"  hover-class="room-control2" 
			@click = "handleUserMic('videoMuted')">
				<view class="roomtit">摄像头</view>
				<view class="roomdesc" >
					<u-switch activeColor="#05c160" :value="!userInfo.videoMuted"  ></u-switch>
				</view>
			</view>
			<view class="room-control" hover-class="room-control2" @click = "handlekickOutMeet">
				<view class="roomtit">移出会议</view>
				
			</view>
		</block>
		
		
	</view>
</template>

<script>
import core from '@/core';
export default{
	data(){
		return{
			roomMute:false
		}
	},
	props:{
		userInfo: {
			type: Object,
			default: function() {
				return {};
			}
		},
		
		Ispermission:{
			type:Boolean,
			default:()=>{
				return false
			}
		},
	},
	methods:{
		handleUserMic(type){
			this.$emit('handleUserMic',{type:type,userInfo:this.userInfo})
		},
		handlekickOutMeet(){
			this.$emit('handlekickOutMeet',this.userInfo)
		}
	}
}
</script>

<style lang="scss" scoped>
.room-box{
	margin-top: 40upx;
	padding: 0 30rpx;
	.room-info{
		background-color: #aed089;
		border-radius: 10rpx;
	}
	.room-info2{
		background-color: #9cbc7d;
	}
	.room-item{
		border-bottom: none;
		display: flex;
		justify-content: space-between;
		line-height: 90rpx;
		padding: 0 20rpx;
		color: #373738;
		&:first-child{
			border-bottom: 1rpx #373738 solid;
		}
		.roomtit{
			
		}
		.roomdesc{
			text-align: right;
			font-size: 30rpx;
			font-weight: bold;
		}
	}
	.room-control{
		padding: 0 20rpx;
		display: flex;
		justify-content: space-between;
		line-height: 140rpx;
		align-items: center;
		border-radius: 10rpx;
		.cuIcon{
			font-size: 40rpx;
		}
	}
	.room-control2{
		background-color: #d5d5d5;
	}
}
.close-btn{
	width: 100%;
	height: 100rpx;
	line-height: 100rpx;
	background-color: #bc4048;
	color: #fff;
	text-align: center;
	border-radius: 10rpx;
	font-size: 35rpx;
	margin: 30rpx auto;
}
.close-btn2{
	background-color: #9f373e;
}
</style>